package com.example.passwordmanager.db;

import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity(tableName = "user")
public class UserBean {
    @PrimaryKey(autoGenerate = true)
    private int id;

    private String name;

    private String username;

    private String password;

    private String content;

    private String secretKey; //用于2fa验证

    public UserBean() {

    }

    @Ignore
    public UserBean(int id) {
        this.id = id;
    }

    @Ignore
    public UserBean(int id, String name, String username, String password, String content,String secretKey) {
        this.id = id;
        this.name = name;
        this.username = username;
        this.password = password;
        this.content = content;
        this.secretKey=secretKey;
    }

    @Ignore
    public UserBean(String name, String username, String password, String content,String secretKey) {
        this.name = name;
        this.username = username;
        this.password = password;
        this.content = content;
        this.secretKey=secretKey;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
